From: Richard M. Stallman Date: Sun, 21 Mar 1993 08:22:37 +0000 (+0000) Subject: (line-number-mode): New function and variable. X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1^2~5^2~96759 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=a61099dd2f73360c853363d0b32bbcbc1e695c29;p=emacs.git (line-number-mode): New function and variable. --- diff --git a/lisp/simple.el b/lisp/simple.el index 9c3a8ecd26e..6577fb92d14 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -1,6 +1,6 @@ ;;; simple.el --- basic editing commands for Emacs -;; Copyright (C) 1985, 1986, 1987, 1992, 1993 Free Software Foundation, Inc. +;; Copyright (C) 1985, 1986, 1987, 1993 Free Software Foundation, Inc. ;; This file is part of GNU Emacs. @@ -1865,11 +1865,25 @@ specialization of overwrite-mode, entered by setting the (interactive "P") (setq overwrite-mode (if (if (null arg) - (not (eq (overwrite-mode 'overwrite-mode-binary))) + (not (eq overwrite-mode 'overwrite-mode-binary)) (> (prefix-numeric-value arg) 0)) 'overwrite-mode-binary)) (force-mode-line-update)) +(defvar line-number-mode nil + "*Non-nil means display line number in mode line.") + +(defun line-number-mode (arg) + "Toggle Line Number mode. +With arg, turn Line Number mode on iff arg is positive. +When Line Number mode is enabled, the line number appears +in the mode line." + (interactive "P") + (setq line-number-mode + (if (null arg) (not line-number-mode) + (> (prefix-numeric-value arg) 0))) + (force-mode-line-update)) + (defvar blink-matching-paren t "*Non-nil means show matching open-paren when close-paren is inserted.")